package top.soulblack.purchasesale.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.PostMapping;
import top.soulblack.purchasesale.model.DTO.OrderDTO;
import top.soulblack.purchasesale.model.OrderMaster;

import java.util.List;

/**
 * @Author: 韦溜溜
 * @Description:
 * @Date: Create in 21:41 2019/7/10
 */
@Mapper
public interface OrderMasterMapper {

    Integer insertOrderMasterList(List<OrderMaster> orderMasterList );

    Integer insertOrderMaster(OrderMaster orderMaster);

    List<OrderDTO> selectListByAllShopId(@Param("shopId") Integer shopId);

    OrderDTO selectListByOrderId(@Param("orderId") String orderId);

    @Update("update order_master set order_status = #{status} where order_id = #{orderId}")
    Integer updateStatuByOrderId(@Param("orderId") String orderId,@Param("status") Integer status);

    @Update("update order_master set remarks = #{remarks} where order_id = #{orderId}")
    Integer updateRemarksByOrderId(@Param("orderId") String orderId,@Param("remarks") String remarks);
}
